﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.IO;
using System.ServiceModel;
using System.Configuration;
using Zen4SyncOrchestratorServices;

namespace Zen4SyncClient.Test
{
    class Program
    {
        
        static void Main( string[] args )
        {
            //Console.WriteLine("Hit <Return> when WCF services are ready...");
            //Console.ReadLine();

            //string ctsdPath = @"D:\CBigot\Zen4Sync\Sources\Main\Core\Zen4SyncCore\Zen4SyncClient.Test\TestData\MEFExecutionCTSD.xml";

            //if (!File.Exists(ctsdPath))
            //{
            //    Console.WriteLine("Unable to find ClientTestSessionDescriptor file");
            //    Console.WriteLine("Searched for {0}", Path.GetFullPath(ctsdPath));
            //    Exit();
            //}

            //Zen4SyncClient.Program.Main(new string[] { ctsdPath });


            ChannelFactory<IOrchestratorServices> orchestrator = new ChannelFactory<IOrchestratorServices>("OrchestratorEndpoint");

            orchestrator.Open();

            Zen4SyncOrchestratorServices.IOrchestratorServices orch = orchestrator.CreateChannel();

            orch.StartTestSession(new Guid("92e336f5-ee32-41bb-a023-47cf0fe29615"), "Password34!");

            orchestrator.Close();
        }

        static void Exit()
        {
            Console.WriteLine("Hit <Return> to exit...");
            Environment.Exit(1);
        }
    }
}
